Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Need the tag and description in the bundle command#351

Merged
pec1985 merged 1 commit intomainfrom
tags
May 26, 2025
Merged

Need the tag and description in the bundle command#351
pec1985 merged 1 commit intomainfrom
tags

Conversation

@pec1985
Copy link
Copy Markdown
Contributor

@pec1985 pec1985 commented May 26, 2025

This needs merging if we want to give our releases a tag and descriptions from github actions

Summary by CodeRabbit

  • New Features
    • Added support for "tag" and "description" options to the bundle command, allowing users to specify deployment tags and descriptions during deployment. These options are only included if provided by the user.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2025

Walkthrough

Two new string flags, "tag" and "description," are added to the bundle command. The command's logic is updated to read these flags and, if set, append corresponding arguments to the deployment step. The flag definitions and help texts are registered in the init() function.

Changes

File(s) Change Summary
cmd/bundle.go Added "tag" and "description" flags to bundle command; updated logic to handle these flags.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BundleCmd
    participant Deployment

    User->>BundleCmd: Execute bundle command with optional --tag and --description
    BundleCmd->>BundleCmd: Parse flags (tag, description)
    BundleCmd->>Deployment: Construct deployment args (conditionally add --tag, --description)
    Deployment-->>BundleCmd: Deployment proceeds
    BundleCmd-->>User: Command completes
Loading

Poem

Two new flags hop into view,
"tag" and "description"—fresh as dew!
Now bundles leap with extra flair,
Carrying words and tags to share.
A rabbit’s joy, a coder’s pride,
More info on every bundle ride!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
cmd/bundle.go (1)

25-32: Update documentation to include new flags.

The long help text lists existing flags but doesn't mention the new --tag and --description flags, creating inconsistency in the documentation.

Add the new flags to the help text:

 Flags:
   --production    Bundle for production deployment
   --install       Install dependencies before bundling
   --deploy        Deploy after bundling
+  --tag           Set the tag of the deployment
+  --description   Set the description of the deployment
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between deb31c9 and 45c82c2.

📒 Files selected for processing (1)
  • cmd/bundle.go (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Test CLI Upgrade Path (windows-latest)
  • GitHub Check: Analyze (go)
🔇 Additional comments (3)
cmd/bundle.go (3)

45-46: LGTM! Flag retrieval follows established patterns.

The flag retrieval logic is consistent with other flags in the command and follows the common cobra pattern of ignoring errors for string flags.


149-150: LGTM! Flag definitions are well-structured.

The flag definitions follow the established pattern and include clear, descriptive help text that aligns with the PR objectives for GitHub Actions integration.


76-81:

Details

❓ Verification inconclusive

Potential conflict with CI mode tag handling.

The implementation correctly checks for non-empty values before appending arguments. However, there's a potential conflict with the existing CI logic (lines 115-117) that also appends --tag arguments. When both --tag and --ci flags are used, multiple --tag arguments will be passed to the deployment command.

Consider whether multiple --tag arguments are supported by the target deployment command, or if the CI and manual tag flags should be mutually exclusive.

Let me verify how the deployment command handles multiple tag arguments:


🏁 Script executed:

#!/bin/bash
# Search for the cloud deploy command implementation to understand tag handling
ast-grep --pattern 'func $_ (cmd *cobra.Command, args []string) {
  $$$
}' | grep -A 20 -B 5 "cloud.*deploy\|deploy.*cloud"

Length of output: 125


🏁 Script executed:

#!/bin/bash
# Show manual --tag appends and CI-driven tag logic in cmd/bundle.go
rg -n -C 5 'append\(args, "--tag"' cmd/bundle.go
rg -n -C 5 '\bci\b' cmd/bundle.go

Length of output: 4043


Cloud CLI: verify support for multiple --tag flags

It looks like we’re appending --tag in two places:

  • cmd/bundle.go:
    • Lines 76–78: user-provided --tag
    • Lines 115–117: CI-driven --tag (commit) plus a second --tag latest

This will pass two (or more) --tag args to cloud deploy. Please confirm whether the Cloud CLI supports multiple --tag flags. If it doesn’t, consider making --ci and --tag mutually exclusive or selecting a single tag source.


cmd/bundle.go

 76  	if tag != "" {
 77-		args = append(args, "--tag", tag)
 78  	}
…
115 	if ci {
116-	  if ciCommit != "" { args = append(args, "--tag", ciCommit) }
117-	  args = append(args, "--tag", "latest")
118  	}

@jhaynie jhaynie changed the title Need the tab and description in the bundle command Need the tag and description in the bundle command May 26, 2025
@pec1985 pec1985 merged commit 3c5c3d9 into main May 26, 2025
14 checks passed
@pec1985 pec1985 deleted the tags branch May 26, 2025 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants